package com.myacg.editor.common.unit.html;
/**
 * 文本类型元素，  没有包裹的标签
 * @author Administrator
 *
 */
public class TextElementBlock extends ElementBlock{
	public  final static String FINAL_NAME = "text"; 
	StringBuffer   content;
	public TextElementBlock(String content) {
		super(FINAL_NAME);
		this.content = new StringBuffer();
		this.content.append(content);
	}
	@Override
	public String getInnerHtml() {
		return this.content.toString();
	}
	
	@Override
	public String getStartTag() {
		return "";
	}
	
	@Override
	public String getEndTag() {
		return "";
	}
	
	@Override
	public ElementBlock addAttribute(String name, String value) {
		 //不做处理
		return this;
	}
	@Override
	public ElementBlock addChild(ElementBlock elementBlock) {
		//无子节点
		return this;
	}
	
	public void append(String text) {
		this.content.append(text);
	}
	
	public String getText(){
		return  content.toString();
	}
}
